﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Company.Product.Entity;
using Company.Product.DAL;

namespace QLChiTieu
{
    public partial class ThemChiTieu : Form
    {
        public ThemChiTieu()
        {
            InitializeComponent();
        }

        private void ThemChiTieu_Load(object sender, EventArgs e)
        {

        }

        private void btnLuuChiTieu_Click(object sender, EventArgs e)
        {
            KeHoachChiTieu chitieu = new KeHoachChiTieu();
            chitieu.ThoiGianThem = DateTime.Now;
            chitieu.SoTien =  Convert.ToInt32(numberSoTien.Value);
            chitieu.GhiChu = txtGhiChu.Text;
            KeHoachChiTieuDao dao = new KeHoachChiTieuDao();
            dao.Insert(null, chitieu);
        }
    }
}
